{% raw %}



{%- capture crop_class -%}
{% if theme_config.global.product_size != '0' %}product_card-picture-crop-{{theme_config.global.product_size}}{% endif %}
{%- endcapture -%}



{% for product in products %}

{%- capture hover_class -%}
{% if theme_config.global.product_move_two %}{% if product.images[1].src %}product_img_hover{% endif %}{% endif %}
{%- endcapture -%}

{%- capture product_handle -%}
{% if product.handle and product.handle != "" %}
{%- if collection_handle and collection_handle != "" -%}/collections/{{collection_handle}}{% endif %}/products/{{ product.handle }}?data_from={{data_from}}
{% else %}
javascript:;
{%- endif -%}
{%- endcapture -%}

{%- capture product_alt -%}
{%- if product.image.alt == "" -%}
  {{ product.title }}
  {%- else -%}
  {{ product.image.alt }}
{%- endif -%}
{%- endcapture -%}

<div class="product_card">
  <div class="product_card-picture {{hover_class}}">
    <a class="product_card-picture-image {{crop_class}}"  href="{{product_handle}}">
        <img class="product_card-picture-default" alt="{{product_alt}}" data-sizes=”auto” data-src="{{ product.src }}" src="https://shopyy.oemsaas.cn/theme/default/assets/empty.png">
        {% if theme_config.global.product_move_two and product.images[1].src  %}
        <img class="product_card-picture-hover" data-sizes=”auto” data-src="{{ product.images[1].src }}" src="https://shopyy.oemsaas.cn/theme/default/assets/empty.png">
        {% endif %}

        {% if product.available == 0 %}
        <div class="product_card-soldout">{{ lang.general.sold_out }}</div>
        {% endif %}

        {% if theme_config.global.product_preview %}
        <div class="product_quick-mask">
          <div class="product_quick-view product_vie_waterfall" data-handle="{{ product.handle }}" data-from="{{data_from}}" href="javascript:void(0)">{{ lang.general.quick_view }}</div>
        </div>
        {% endif %}
    </a>
    

    {% if theme_config.global.product_discount_label and product.variant.price > 0 %} 
    {% if product.variant.price < product.variant.compare_at_price %}
    {% assign price = product.variant.compare_at_price | minus: product.variant.price | divided_by: product.variant.compare_at_price | times: 100 | floor %}
    {% if price > 0 %}
    <div class="product_card-tag {{ theme_config.global.discount_label_style }}"><div class="discount_tag_graphics"></div><div class="discount_tag_name">{{ price }}% <span>OFF</span></div></div>
    {% endif %} 
    {% endif %}
    {% endif %}

    

  </div>
  <div class="product_card-name {% unless theme_config.global.product_title_model %}product_card-wap-name{% endunless %}">
    <a class="{% if theme_config.global.product_title_style == 'hide' %}text-ellipsis{% endif %}" href="{{product_handle}}">{{ product.highlight_title | default : product.title | default:"Title" }}</a>
  </div>
  <div class="product_card-price">
    <span class="general-price">{{ product.variant.price | default : "88.88" | money }}</span>
    {% if product.variant.compare_at_price != "0" and  product.variant.price < product.variant.compare_at_price %}
        <span class="general-oldprice">{{ product.variant.compare_at_price  | default : "88.88" | money }}</span>
    {% endif %}
  </div>
</div>
{% endfor %}

{% endraw %}